#ifndef MPHTTPREQUESTSTRINGCONTENT_H
#define MPHTTPREQUESTSTRINGCONTENT_H

/*****************************************
 * HttpRequestStringContent 继承于 HttpRequestContent
 *****************************************/

#include "mpHttpRequestMessage.h"

namespace MP{
namespace HTTP{
namespace INTERNAL{

class HttpRequestStringContent : public HttpRequestContent
{
public:
    HttpRequestStringContent(const std::string& data,
                             const std::string & httpcontent_type);

    ~HttpRequestStringContent() override = default;

    virtual std::string getMd5() override;
    virtual std::size_t getContentLength() override;
    virtual bool beginWriteData() override;
    virtual bool onWriteDataSome(std::vector<boost::asio::const_buffer>& buffers) override;
    virtual void endWriteData()override;

private:
    std::string _data;
};

}   //INTERNAL
}   //HTTP
}   //MP

#endif // MPHTTPREQUESTSTRINGCONTENT_H
